home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
AIncludes
/
ADSP.a
< prev
next >
Wrap
Text File
|
1996-05-01
|
8KB
|
158 lines
;
; File: ADSP.a
;
; Contains: AppleTalk Data Stream Protocol (ADSP) Interfaces.
;
; Version: Technology: System 7.5
; Release: Universal Interfaces 3.0d3 on Copland DR1
;
; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
;
; Bugs?: If you find a problem with this file, send the file and version
; information (from above) and the problem description to:
;
; Internet: apple.bugs@applelink.apple.com
; AppleLink: APPLE.BUGS
;
;
IF &TYPE('__ADSP__') = 'UNDEFINED' THEN
__ADSP__ SET 1
IF &TYPE('__ERRORS__') = 'UNDEFINED' THEN
include 'Errors.a'
ENDIF
IF &TYPE('__APPLETALK__') = 'UNDEFINED' THEN
include 'AppleTalk.a'
ENDIF
IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
; Error Codes have been moved to Errors.(pah)
; driver control csCodes
dspInit EQU 255 ; create a new connection end
dspRemove EQU 254 ; remove a connection end
dspOpen EQU 253 ; open a connection
dspClose EQU 252 ; close a connection
dspCLInit EQU 251 ; create a connection listener
dspCLRemove EQU 250 ; remove a connection listener
dspCLListen EQU 249 ; post a listener request
dspCLDeny EQU 248 ; deny an open connection request
dspStatus EQU 247 ; get status of connection end
dspRead EQU 246 ; read data from the connection
dspWrite EQU 245 ; write data on the connection
dspAttention EQU 244 ; send an attention message
dspOptions EQU 243 ; set connection end options
dspReset EQU 242 ; forward reset the connection
dspNewCID EQU 241 ; generate a cid for a connection end
; connection opening modes
ocRequest EQU 1 ; request a connection with remote
ocPassive EQU 2 ; wait for a connection request from remote
ocAccept EQU 3 ; accept request as delivered by listener
ocEstablish EQU 4 ; consider connection to be open
; connection end states
sListening EQU 1 ; for connection listeners
sPassive EQU 2 ; waiting for a connection request from remote
sOpening EQU 3 ; requesting a connection with remote
sOpen EQU 4 ; connection is open
sClosing EQU 5 ; connection is being torn down
sClosed EQU 6 ; connection end state is closed
; client event flags
eClosed EQU $80 ; received connection closed advice
eTearDown EQU $40 ; connection closed due to broken connection
eAttention EQU $20 ; received attention message
eFwdReset EQU $10 ; received forward reset advice
; miscellaneous constants
attnBufSize EQU 570 ; size of client attention buffer
minDSPQueueSize EQU 100 ; Minimum size of receive or send Queue
; connection control block
; typedef TRCCB * TPCCB
TRCCB RECORD 0
ccbLink ds.l 1 ; offset: $0 (0) ; link to next ccb
refNum ds.w 1 ; offset: $4 (4) ; user reference number
state ds.w 1 ; offset: $6 (6) ; state of the connection end
userFlags ds.b 1 ; offset: $8 (8) ; flags for unsolicited connection events
localSocket ds.b 1 ; offset: $9 (9) ; socket number of this connection end
remoteAddress ds AddrBlock ; offset: $A (10) ; internet address of remote end
attnCode ds.w 1 ; offset: $E (14) ; attention code received
attnSize ds.w 1 ; offset: $10 (16) ; size of received attention data
attnPtr ds.l 1 ; offset: $12 (18) ; ptr to received attention data
reserved ds.b 220 ; offset: $16 (22) ; for adsp internal use
sizeof EQU * ; size: $F2 (242)
ENDR
DSPParamBlock RECORD 0
qLink ds.l 1 ; offset: $0 (0)
qType ds.w 1 ; offset: $4 (4)
ioTrap ds.w 1 ; offset: $6 (6)
ioCmdAddr ds.l 1 ; offset: $8 (8)
ioCompletion ds.l 1 ; offset: $C (12)
ioResult ds.w 1 ; offset: $10 (16)
ioNamePtr ds.l 1 ; offset: $12 (18)
ioVRefNum ds.w 1 ; offset: $16 (22)
ioCRefNum ds.w 1 ; offset: $18 (24) ; adsp driver refNum
csCode ds.w 1 ; offset: $1A (26) ; adsp driver control code
qStatus ds.l 1 ; offset: $1C (28) ; adsp internal use
ccbRefNum ds.w 1 ; offset: $20 (32)
ccbPtr ds.l 1 ; offset: $22 (34) ; pointer to connection control block
userRoutine ds.l 1 ; offset: $26 (38) ; client routine to call on event
sendQSize ds.w 1 ; offset: $2A (42) ; size of send queue (0..64K bytes)
sendQueue ds.l 1 ; offset: $2C (44) ; client passed send queue buffer
recvQSize ds.w 1 ; offset: $30 (48) ; size of receive queue (0..64K bytes)
recvQueue ds.l 1 ; offset: $32 (50) ; client passed receive queue buffer
attnPtr ds.l 1 ; offset: $36 (54) ; client passed receive attention buffer
localSocket ds.b 1 ; offset: $3A (58) ; local socket number
filler1 ds.b 1 ; offset: $3B (59) ; filler for proper byte alignment
ORG 34
localCID ds.w 1 ; offset: $22 (34) ; local connection id
remoteCID ds.w 1 ; offset: $24 (36) ; remote connection id
remoteAddress ds AddrBlock ; offset: $26 (38) ; address of remote end
filterAddress ds AddrBlock ; offset: $2A (42) ; address filter
sendSeq ds.l 1 ; offset: $2E (46) ; local send sequence number
sendWindow ds.w 1 ; offset: $32 (50) ; send window size
recvSeq ds.l 1 ; offset: $34 (52) ; receive sequence number
attnSendSeq ds.l 1 ; offset: $38 (56) ; attention send sequence number
attnRecvSeq ds.l 1 ; offset: $3C (60) ; attention receive sequence number
ocMode ds.b 1 ; offset: $40 (64) ; open connection mode
ocInterval ds.b 1 ; offset: $41 (65) ; open connection request retry interval
ocMaximum ds.b 1 ; offset: $42 (66) ; open connection request retry maximum
filler2 ds.b 1 ; offset: $43 (67) ; filler for proper byte alignment
ORG 34
abort ds.b 1 ; offset: $22 (34) ; abort connection immediately if non-zero
filler3 ds.b 1 ; offset: $23 (35) ; filler for proper byte alignment
ORG 34
reqCount ds.w 1 ; offset: $22 (34) ; requested number of bytes
actCount ds.w 1 ; offset: $24 (36) ; actual number of bytes
dataPtr ds.l 1 ; offset: $26 (38) ; pointer to data buffer
eom ds.b 1 ; offset: $2A (42) ; indicates logical end of message
flush ds.b 1 ; offset: $2B (43) ; send data now
ORG 34
attnCode ds.w 1 ; offset: $22 (34) ; client attention code
attnSize ds.w 1 ; offset: $24 (36) ; size of attention data
attnData ds.l 1 ; offset: $26 (38) ; pointer to attention data
attnInterval ds.b 1 ; offset: $2A (42) ; retransmit timer in 10-tick intervals
filler4 ds.b 1 ; offset: $2B (43) ; filler for proper byte alignment
ORG 34
statusCCB ds.l 1 ; offset: $22 (34) ; pointer to ccb
sendQPending ds.w 1 ; offset: $26 (38) ; pending bytes in send queue
sendQFree ds.w 1 ; offset: $28 (40) ; available buffer space in send queue
recvQPending ds.w 1 ; offset: $2A (42) ; pending bytes in receive queue
recvQFree ds.w 1 ; offset: $2C (44) ; available buffer space in receive queue
ORG 34
sendBlocking ds.w 1 ; offset: $22 (34) ; quantum for data packets
sendTimer ds.b 1 ; offset: $24 (36) ; send timer in 10-tick intervals
rtmtTimer ds.b 1 ; offset: $25 (37) ; retransmit timer in 10-tick intervals
badSeqMax ds.b 1 ; offset: $26 (38) ; threshold for sending retransmit advice
useCheckSum ds.b 1 ; offset: $27 (39) ; use ddp packet checksum
ORG 34
newcid ds.w 1 ; offset: $22 (34) ; new connection id returned
ORG 68
sizeof EQU * ; size: $44 (68)
ENDR
; typedef struct DSPParamBlock * DSPPBPtr
ENDIF
ENDIF ; __ADSP__